package com.byb.server.service;

import com.byb.server.domain.Achievement;
import com.byb.server.service.dto.AchievementDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * Service Interface for managing Achievement.
 */
public interface AchievementService {

    /**
     * Save a achievement.
     *
     * @param achievementDTO the entity to save
     * @return the persisted entity
     */
    AchievementDTO save(AchievementDTO achievementDTO);

    /**
     *  Get all the achievements.
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<AchievementDTO> findAll(Pageable pageable);

    /**
     *  Get the "id" achievement.
     *
     *  @param id the id of the entity
     *  @return the entity
     */
    AchievementDTO findOne(Long id);

    /**
     *  Delete the "id" achievement.
     *
     *  @param id the id of the entity
     */
    void delete(Long id);

    /**
     * Search for the achievement corresponding to the query.
     *
     *  @param query the query of the search
     *
     *  @param pageable the pagination information
     *  @return the list of entities
     */
    Page<AchievementDTO> search(String query, Pageable pageable);

    AchievementDTO findOneByProductId(Long id);
}
